package org.ivwsqii.observer;

/**
 * 	真实观察者
 * @author Administrator
 *
 */
public class RealObserver implements Observer {

	private String name;
//	private Subject subject;

	//	public RealObserver(Subject subject,String name) {
//		this.name = name;
//		this.subject = subject;
//		subject.registerObserver(this);
//	}
	public RealObserver(String name) {
		this.name = name;
	}

	@Override
	public void update(String message) {
//		subject.toString();
		System.out.println(message+":"+name+"收到");
	}

}
